package com.lemurian.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.lemurian.entity.utils.DefaultPersistence;

@Entity
@Table(name="tb_signature_changes")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@BatchSize(size=1000)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class ScheduleChanges extends DefaultPersistence implements Serializable {

	private static final long serialVersionUID = 1L;

	private String cancelationReason;
	private Date signatureDate;
	
	@ManyToOne
	@JoinColumn(name="client_id")
	private Client client;
	
	@Column(name="cancelation_reason", length=128)
	public String getCancelationReason() {
		return cancelationReason;
	}
	
	public void setCancelationReason(String cancelationReason) {
		this.cancelationReason = cancelationReason;
	}

	@Temporal(TemporalType.DATE)
	@Column(name="signature_date")
	public Date getSignatureDate() {
		return signatureDate;
	}

	public void setSignatureDate(Date signatureDate) {
		this.signatureDate = signatureDate;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}
	
}
